package top.kaoshanji.r1ch06b;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 代码清单-r1ch06b-215页c：启动容器发送一个事件
 * @author kaoshanji
 * ^_^
 * create time 2025/5/6 20:01
 */
public class ApplicationEventTest {

    public static void main(String[] args) {

        ApplicationContext context = new ClassPathXmlApplicationContext("r1ch06b/beans.xml");

        MailSender mailSender = (MailSender)context.getBean("mailSender");
        mailSender.sendMail("aaa@bbb.com");

    }

}
